package com.inepex.inechart.client.linechart;

import java.util.ArrayList;

import com.inepex.inechart.shared.linechart.Point;

class CurvePart implements Comparable<CurvePart>{
	double from;
	double to;
	Point beforeMax;
	Point beforeMin;
	Point afterMax;
	Point afterMin;
	ArrayList<Point> insidePoints;
	Point justBefore;
	Point justAfter;
	
	public CurvePart(double from, double to) {

		this.from = from;
		this.to = to;
	}
	public CurvePart(double from, double to, Point beforeMax,
			Point beforeMin, Point afterMax, Point afterMin,
			ArrayList<Point> insidePoints, Point justBefore, Point justAfter) {
		super();
		this.from = from;
		this.to = to;
		this.beforeMax = beforeMax;
		this.beforeMin = beforeMin;
		this.afterMax = afterMax;
		this.afterMin = afterMin;
		this.insidePoints = insidePoints;
		this.justBefore = justBefore;
		this.justAfter = justAfter;
	}
	public double getFrom() {
		return from;
	}
	public double getTo() {
		return to;
	}
	public Point getBeforeMax() {
		return beforeMax;
	}
	public Point getBeforeMin() {
		return beforeMin;
	}
	public Point getAfterMax() {
		return afterMax;
	}
	public Point getAfterMin() {
		return afterMin;
	}
	public ArrayList<Point> getInsidePoints() {
		return insidePoints;
	}
	public Point getJustBefore() {
		return justBefore;
	}
	public Point getJustAfter() {
		return justAfter;
	}
	@Override
	public int compareTo(CurvePart o) {
		return ((Double)from).compareTo(o.from);
	}
	public void setFrom(double from) {
		this.from = from;
	}
	public void setTo(double to) {
		this.to = to;
	}
	public void setBeforeMax(Point beforeMax) {
		this.beforeMax = beforeMax;
	}
	public void setBeforeMin(Point beforeMin) {
		this.beforeMin = beforeMin;
	}
	public void setAfterMax(Point afterMax) {
		this.afterMax = afterMax;
	}
	public void setAfterMin(Point afterMin) {
		this.afterMin = afterMin;
	}
	public void setInsidePoints(ArrayList<Point> insidePoints) {
		this.insidePoints = insidePoints;
	}
	public void setJustBefore(Point justBefore) {
		this.justBefore = justBefore;
	}
	public void setJustAfter(Point justAfter) {
		this.justAfter = justAfter;
	}
	
}